// @ts-ignore

 
import { api } from '@/utils/api';

/** 验收 POST /safeHazardInfo/acceptance */
export async function safeHazardInfoAcceptance(
  body: BIZAPI.SafeHazardInfoAcceptanceReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function safeHazardInfoAcceptance(
  body: BIZAPI.SafeHazardInfoAcceptanceReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function safeHazardInfoAcceptance(
  body: BIZAPI.SafeHazardInfoAcceptanceReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function safeHazardInfoAcceptance(
  body: BIZAPI.SafeHazardInfoAcceptanceReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/safeHazardInfo/acceptance`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultObject>(`/app/safeHazardInfo/acceptance`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 新增安全-隐患信息数据 POST /safeHazardInfo/add */
export async function safeHazardInfoAdd(
  body: BIZAPI.SafeHazardInfoCreateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function safeHazardInfoAdd(
  body: BIZAPI.SafeHazardInfoCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function safeHazardInfoAdd(
  body: BIZAPI.SafeHazardInfoCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function safeHazardInfoAdd(
  body: BIZAPI.SafeHazardInfoCreateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/safeHazardInfo/add`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultObject>(`/app/safeHazardInfo/add`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 删除安全-隐患信息数据 POST /safeHazardInfo/delete */
export async function safeHazardInfoDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function safeHazardInfoDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function safeHazardInfoDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function safeHazardInfoDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/safeHazardInfo/delete`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultObject>(`/app/safeHazardInfo/delete`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 下载模板 POST /safeHazardInfo/download/template */
export async function safeHazardInfoDownloadTemplate(
  options?: ArgumentsType<typeof api>[1]
): Promise<any>;

export async function safeHazardInfoDownloadTemplate(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<any>>;

export async function safeHazardInfoDownloadTemplate(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<any>;

export async function safeHazardInfoDownloadTemplate(options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<any>(`/app/safeHazardInfo/download/template`, {
      method: 'POST',
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<any>(`/app/safeHazardInfo/download/template`, {
    method: 'POST',
    ...(options || {})
  });
}

/** 获取安全-隐患信息数据 POST /safeHazardInfo/get */
export async function safeHazardInfoGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultSafeHazardInfoEntity>;

export async function safeHazardInfoGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultSafeHazardInfoEntity>>;

export async function safeHazardInfoGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultSafeHazardInfoEntity>;

export async function safeHazardInfoGet(body: BIZAPI.ID, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultSafeHazardInfoEntity>(`/app/safeHazardInfo/get`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultSafeHazardInfoEntity>(`/app/safeHazardInfo/get`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 导入数据 POST /safeHazardInfo/import */
export async function safeHazardInfoImport(
  body: {},
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function safeHazardInfoImport(
  body: {},
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function safeHazardInfoImport(
  body: {},
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function safeHazardInfoImport(body: {}, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/safeHazardInfo/import`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultObject>(`/app/safeHazardInfo/import`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取安全-隐患信息分页数据 POST /safeHazardInfo/page */
export async function safeHazardInfoPage(
  body: BIZAPI.SafeHazardInfoQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageSafeHazardInfoEntity>;

export async function safeHazardInfoPage(
  body: BIZAPI.SafeHazardInfoQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageSafeHazardInfoEntity>>;

export async function safeHazardInfoPage(
  body: BIZAPI.SafeHazardInfoQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageSafeHazardInfoEntity>;

export async function safeHazardInfoPage(
  body: BIZAPI.SafeHazardInfoQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageSafeHazardInfoEntity>(`/app/safeHazardInfo/page`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultIPageSafeHazardInfoEntity>(`/app/safeHazardInfo/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 统计 POST /safeHazardInfo/statistics */
export async function safeHazardInfoStatistics(
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultSafeHazardInfoStatisticsResp>;

export async function safeHazardInfoStatistics(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultSafeHazardInfoStatisticsResp>>;

export async function safeHazardInfoStatistics(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultSafeHazardInfoStatisticsResp>;

export async function safeHazardInfoStatistics(options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultSafeHazardInfoStatisticsResp>(`/app/safeHazardInfo/statistics`, {
      method: 'POST',
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultSafeHazardInfoStatisticsResp>(`/app/safeHazardInfo/statistics`, {
    method: 'POST',
    ...(options || {})
  });
}

/** 更新安全-隐患信息数据 POST /safeHazardInfo/update */
export async function safeHazardInfoUpdate(
  body: BIZAPI.SafeHazardInfoUpdateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function safeHazardInfoUpdate(
  body: BIZAPI.SafeHazardInfoUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function safeHazardInfoUpdate(
  body: BIZAPI.SafeHazardInfoUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function safeHazardInfoUpdate(
  body: BIZAPI.SafeHazardInfoUpdateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/safeHazardInfo/update`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultObject>(`/app/safeHazardInfo/update`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}
